﻿using System;
using System.Configuration;

namespace PrearrangedChaos.AgileZen.Service.Rest
{
    public class Configuration : ConfigurationSection
    {
        [ConfigurationProperty("defaultApiKey", IsRequired = false)]
        public String DefaultApiKey
        {
            get
            {
                return (String)this["defaultApiKey"];
            }
            set
            {
                this["defaultApiKey"] = value;
            }
        }

        [ConfigurationProperty("baseAddress", DefaultValue = "https://agilezen.com/api/v1/", IsRequired = false)]
        public String BaseAddress
        {
            get
            {
                return (String)this["baseAddress"];
            }
            set
            {
                this["baseAddress"] = value;
            }
        }

        [ConfigurationProperty("connectionTimeout", DefaultValue = 300000, IsRequired = false)]
        public int ConnectionTimeout
        {
            get
            {
                return (int)this["connectionTimeout"];
            }
            set
            {
                this["connectionTimeout"] = value;
            }
        }

        [ConfigurationProperty("readWriteTimeout", DefaultValue = 100000, IsRequired = false)]
        public int ReadWriteTimeout
        {
            get
            {
                return (int)this["readWriteTimeout"];
            }
            set
            {
                this["readWriteTimeout"] = value;
            }
        }

        [ConfigurationProperty("defaultPageSize", IsRequired = false, DefaultValue = 100)]
        public int DefaultPageSize
        {
            get
            {
                return (int)this["defaultPageSize"];
            }
            set
            {
                this["defaultPageSize"] = value;
            }
        }

    }
}
